<form class="form-horizontal" action="/ajax/releasetb" method="post" id="taskEditForm">
<div class="main">
    <div class="main-nav fl">
        <ul class="nave nav-tabs container">
            <li class=""><a href="/task/tbtask">任务大厅</a></li>
            <li class=""><a href="smission.html">我的任务</a></li>
            <li class=""><a href="/task/bindtb">绑定店铺</a></li>
            <li class="active resa"><a href="javascript:void(0)">编辑淘宝单</a></li>
        </ul>
    </div>
    <div class="task-wrap task-edit-wrap container hid fl ">
        <ul class="nave nav-pills operate-nav fl cf czw">
            <li class="shu">刷手限制：</li>
            <li class="jied jinen"><a id="daysLimit" href="javascript:void(0);">接单限制</a></li>
            <li class="active extra"><a id="areaLimit" href="javascript:void(0);">地域限制</a></li>
            <li class="last"> </li>
        </ul>
            <div class="form-group form-groupn fl">
                <label class="control-label col-2x fl">掌柜名：</label>
                <select class="form-control input-small fl" id="shopId" name="task_shop_id">
                    <option value="0">请选择</option>
                    <?php foreach($shopList as $s){ ?>
                    <option value="<?php echo $s->shop_id; ?>" <?php if($s->shop_id == $task->shop_id){ ?>selected<?php } ?>><?php echo $s->shop_keeper; ?></option>
                    <?php } ?>
                </select>
            </div>
            <div class="form-group cf fl">
                <label class="control-label col-2x">任务摘要：</label>
                <input class="form-control input-large" name="task_summary" type="text" value="<?php echo $task->task_summary; ?>" />
            </div>
            <div class="form-group cf fl">
                <label class="control-label col-2x">商品标签：</label>
                <select class="form-control input-small input-smallm fl" id="task_tag_id" name="task_tag_id">
                    <?php foreach($tagList as $t){ ?>
                    <option class="fl" value="<?php echo $t->tag_id; ?>"><?php echo $t->tag_name; ?></option>
                    <?php } ?>
                </select> <button class="btn mt5 ml20" type="button"><span class="add">查看商品标签说明</span></button>
            </div>
            <div class="form-group fl cf">
                <label class="control-label col-2x fl">搜索提示：</label>
                <div class="input-group input-5x fl"> <span class="input-group-addon">搜索关键词</span>
                    <input class="form-control" name="task_search_keywords" type="text">
                </div>
                <select class="form-control input-small" style="margin-left:32px" name="task_search_type">
                    <option value="0">搜索类型 </option>
                    <option value="1">淘宝搜索</option>
                    <option value="2">天猫搜索</option>
                </select>
                <select class="form-control input-small" name="task_sort_type">
                    <option value="0">排序方式</option>
                    <option value="1">综合排序</option>
                    <option value="2">人气排序</option>
                    <option value="3">销量排序</option>
                    <option value="4">直通车排序</option>
                </select>

            </div>
            <div class="form-group fl">
                <label class="control-label col-2x fl">添加商品：</label>
                <div class="data-table product-list" style="float:left;width:900px">
                    <table>
                        <colgroup>
                            <col width="22%">
                            <col width="9%">
                            <col width="9%">
                            <col width="22%">
                            <col width="20%">
                            <col width="18%">
                        </colgroup>
                        <thead>
                        <tr>
                            <th>商品链接</th>
                            <th>商品价格</th>
                            <th>需拍数量</th>
                            <th>位置提示</th>
                            <th>商品图片</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody id="goodsBaseBody">
                        <tr> </tr>
                        <tr class="td_c product-row">
                            <td>
                                <input class="form-control goods-link" name="task_goods_link" type="text" />
                            </td>
                            <td>
                                <input class="form-control product-price input-mini" name="task_goods_price" id="goods_price" type="text" />
                            </td>
                            <td>
                                <input class="form-control product-num input-mini" name="task_goods_num"  value="1" type="text" />
                            </td>
                            <td>
                                <textarea class="form-control" name="task_goods_prompt"></textarea>
                            </td>
                            <td><a href="javascript:void(0);"><img class="product-img img-thumbnail" src="/static/images/noimage.gif" /></a>
                                <input class="product-img-val" name="task_goods_picture" type="hidden" />
                            </td>
                            <td><span class="btn file-btn btn-mini">上传图片<input class="upload-img" type="file" /></span></td>
                        </tr>
                        </tbody>
                        <!-- 多链接商品内容 -->
                    </table>
                </div>
            </div>
            <div class="form-group fl">
                <label class="control-label col-2x">多链接：</label>
                <button class="btn" type="button" onclick="addProduct()"><span class="add">添加商品</span></button>
                <span class="ml_10 f14">任务总价格:<b id="totalPrice" class="orange">0.00元</b>（每添加一个链加加0.5元）</span> </div>
            <div class="form-group fl">
                <label class="control-label col-2x">买号等级：</label>
                <select class="form-control input-mid" id="level" name="task_buyer_level"  alt="请选择买号等级">
                    <option value="0">请选择</option>
                    <?php if($user->user_type==1){ ?>
                    <option value="1">无星--3.0元</option>
                    <option value="2">一星--4.5元</option>
                    <option value="3">二星--5.5元</option>
                    <option value="4">三星--6.0元</option>
                    <option value="5">四星--7.0元</option>
                    <option value="6">五星--7.5元</option>
                    <option value="7">钻石以上--8.0元</option>
                    <?php }elseif($user->user_type==2){ ?>
                    <option value="1">无星--3.0元</option>
                    <option value="2">一星--4.0元</option>
                    <option value="3">二星--4.5元</option>
                    <option value="4">三星--5.0元</option>
                    <option value="5">四星--5.5元</option>
                    <option value="6">五星--6.0元</option>
                    <option value="7">钻石以上--7.0元</option>
                    <?php } ?>
                </select>
            </div>
            <div class="form-group fl">
                <label class="control-label col-2x">刷手佣金：</label>
                <b id="taskPrice" class="orange f14">0元</b>
                <button type="button" id="showBuyerPrice" class="btn btn-tag ml10 chec">查看佣金规则</button>
            </div>
            <div class="form-group fl">
                <label class="control-label col-2x"> 追加佣金：</label>
                <input class="form-control input-mini" id="addFee" name="task_add_commission" value="0" type="text" />
                <b id="taskPrice" class="orange f14 ml10">元</b> </div>
            <div class="form-group fl">
                <label class="control-label col-2x">任务入口：</label>
                <label class="radio-inline"><input name="task_entrance" value="1" checked type="radio">电脑端</label>
                <label class="radio-inline"><input name="task_entrance" value="2" type="radio">手机端</label>
            </div>
            <div class="form-group fl">
                <label class="control-label col-2x">任务需求：</label>
                <textarea rows="5" cols="40" class="xqi" name="task_demand"></textarea>
            </div>
            <div class="form-group fl">
                <label class="control-label col-2x">支付类型：</label>
                <label class="radio-inline">
                    <input name="task_pay_type" value="1" checked="checked" type="radio">
                    刷手垫付</label>
                <label class="radio-inline">
                    <input name="task_pay_type" value="2" type="radio">
                    商家远程</label>
            </div>
            <div class="form-group fl">
                <label class="control-label col-2x">返款账户：</label>
                <label class="radio-inline">
                    <input name="task_return_type" value="1" type="radio">
                    账户余额</label>
                <label class="radio-inline">
                    <input name="task_return_type" value="2" checked type="radio">
                    支付宝收款</label>
                <label class="radio-inline">
                    <input name="task_return_type" value="3" type="radio">
                    财付通转账</label>
                <label class="radio-inline">
                    <input name="task_return_type" value="4" type="radio">
                    支付宝转账</label>

                <label class="radio-inline">
                    <input name="task_return_type" value="5" type="radio">
                    其它</label>
            </div>
            <div class="form-group fl">
                <label class="control-label col-2x">返款时间：</label>
                <select class="form-control input-mid" name="task_return_time">
                    <option value="1">1小时内</option>
                    <option value="3">3小时内</option>
                    <option value="12">12小时内</option>
                </select>
            </div>
            <div class="form-group fl">
                <label class="control-label col-2x">任务数量 ：</label>
                <input class="form-control input-small " name="task_num" type="text" value="1" />
            </div>
            <div class="fl rean">
                <input class="btn btn-xlarge btn-orange" value="保存并发布任务" type="button" id="saveRelease" />
            </div>
            <div class=" rean fl">
                <input class="btn btn-xlarge btn-orange" value="取消" type="button" id="cancel" />
            </div>
    </div>
</div>

<div class="expte">
    <div class="bg aui_outer">
        <table class="aui_border">
            <tbody class="winr">
            <tr>
                <td class="aui_nw"></td>
                <td class="aui_n"></td>
                <td class="aui_ne"></td>
            </tr>
            <tr>
                <td class="aui_w"></td>
                <td class="aui_c">
                    <div class="aui_inner">
                        <table

                            class="aui_dialog">
                            <tbody>
                            <tr>
                                <td colspan="2" class="aui_header">
                                    <div class="aui_titleBar">
                                        <div style="" class="aui_title aui_titlen fl">提示信息<a

                                                style="display: block;" class="aui_close ff" href="javascript:void(0)">×</a></div>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: auto; height: auto;" class="aui_main">
                                    <div style="padding: 0px;" class="aui_content">
                                        <div style="display: block;height:10px;" class="buyn"></div>
                                        <div id="proinfo" style="margin-bottom:10px;text-align:center;">内容</div>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2" class="aui_footer">
                                    <div class="aui_buttons false">
                                        <input class="btn btn-search" value="确定" type="button" />
                                    </div>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </td>
                <td class="aui_e"></td>
            </tr>
            <tr>
                <td class="aui_sw"></td>
                <td class="aui_s"></td>
                <td style="cursor: se-resize;" class="aui_se"></td>
            </tr>
            </tbody>
        </table>
    </div>
</div>

<div class="jine">
    <div class="bg aui_outer">
        <table class="aui_border">
            <tbody class="winr">
            <tr>
                <td class="aui_nw"></td>
                <td class="aui_n"></td>
                <td class="aui_ne"></td>
            </tr>
            <tr>
                <td class="aui_w"></td>
                <td class="aui_c">
                    <div class="aui_inner">
                        <table class="aui_dialog">
                            <tbody>
                            <tr>
                                <td colspan="2" class="aui_header">
                                    <div class="aui_titleBar">
                                        <div style="" class="aui_title aui_titlen fl">接单限制<a style="display: block;" class="aui_close ff" href="javascript:void(0)">×</a></div>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: auto; height: auto;" class="aui_main">
                                    <div style="padding: 0px;" class="aui_content">
                                        <div style="display: block;" class="buyn">
                                            <div class="title cf mt10">
                                                <p class="mr_10 fl">
                                                <h3>限制同一刷手</h3>
                                                </p>
                                            </div>
                                            <div class="form-group">
                                                <label class="radio-inline">
                                                    <input name="task_day" value="3" type="radio" />
                                                    3天内 </label>
                                                <label class="radio-inline">
                                                    <input checked="checked" name="task_day" value="7" type="radio" />
                                                    7天内 </label>
                                                <label class="radio-inline">
                                                    <input name="task_day" value="14" type="radio" />
                                                    14天内 </label>
                                                <label class="radio-inline">
                                                    <input name="task_day" value="21" type="radio" />
                                                    21天内 </label>
                                                <label class="radio-inline">
                                                    <input name="task_day" value="30" type="radio" />
                                                    30天内 </label>
                                            </div>
                                            <div class="form-group">
                                                <label class="radio-inline">
                                                    <input checked="checked" name="task_day_type" value="1" type="radio" />
                                                    同一店铺只能接一单 </label>
                                                <label class="radio-inline">
                                                    <input name="task_day_type" value="2" type="radio" />
                                                    所有店铺只能接一单 </label>
                                            </div>
                                        </div>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2" class="aui_footer">
                                    <div class="aui_buttons false">
                                        <input class="btn btn-search" value="确定" type="button" />
                                    </div>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </td>
                <td class="aui_e"></td>
            </tr>
            <tr>
                <td class="aui_sw"></td>
                <td class="aui_s"></td>
                <td style="cursor: se-resize;"

                    class="aui_se"></td>
            </tr>
            </tbody>
        </table>
    </div>
</div>
<div class="extran">
    <div class="bg aui_outer">
        <table

            class="aui_border">
            <tbody class="winr">
            <tr>
                <td class="aui_nw"></td>
                <td class="aui_n"></td>
                <td class="aui_ne"></td>
            </tr>
            <tr>
                <td class="aui_w"></td>
                <td class="aui_c">
                    <div class="aui_inner">
                        <table class="aui_dialog">
                            <tbody>
                            <tr>
                                <td colspan="2" class="aui_header">
                                    <div class="aui_titleBar">
                                        <div style="" class="aui_title huen fl">地域限制<a style="display: block;" class="aui_close ff" href="javascript:void(0)">×</a></div>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: auto; height: auto;" class="aui_main">
                                    <div style="padding: 0px;" class="aui_content">
                                        <div style="display: block;" class="buyn">
                            <thead class="fl iueo">
                            <tr>
                                <th colspan="5">
                                    <div class="thead-title">请选制限制地域</div>
                                </th>
                            </tr>

                            <?php foreach($areaList as $k=>$a){ ?>
                                <?php if($k%5==0){ ?>
                                    <tr>
                                <?php } ?>
                                <td><input type="checkbox" value="<?php echo $a->Id; ?>" name="areas[]" /> <?php echo $a->Name; ?></td>
                            <?php } ?>

                            </thead>
                    </div>
    </div>
    </td>
    </tr>
    <tr>
        <td colspan="2" class="aui_footer">
            <div class="aui_buttons false">
                <input class="btn btn-search" value="确定" type="button">
            </div>
        </td>
    </tr>
    </tbody>
    </table>
</div>
</td>
<td class="aui_e"></td>
</tr>
<tr>
    <td class="aui_sw"></td>
    <td class="aui_s"></td>
    <td style="cursor: se-resize;"

        class="aui_se"></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="checn">
    <div class="bg aui_outer">
        <table

            class="aui_border">
            <tbody class="winr">
            <tr>
                <td class="aui_nw"></td>
                <td class="aui_n"></td>
                <td class="aui_ne"></td>
            </tr>
            <tr>
                <td class="aui_w"></td>
                <td class="aui_c">
                    <div class="aui_inner">
                        <table

                            class="aui_dialog">
                            <tbody>
                            <tr>
                                <td colspan="2" class="aui_header">
                                    <div class="aui_titleBar">
                                        <div style="" class="aui_title chenk fl">佣金规则<a style="display: block;" class="aui_close ff" href="javascript:void(0)">×</a></div>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: auto; height: auto;" class="aui_main">
                                    <div style="padding: 0px;" class="aui_content">
                                        <div style="display: block;" class="buyn"

                                             id="">
                            <thead class="fl">

                            <tr>
                                <th colspan="5">
                                    <div class="thead-titlen mt20">
                                        <p class="summary"> <b class="orange">远程单：</b>佣金为您所选买号星级对应的佣金价格。<br>
                                            <b class="orange">垫付单：</b>佣金由您所选<b>（买号星级对应的佣金）</b>价格加上任务<b>（商品价格对应的佣金）</b>。<br>
                                            <b class="orange">备注：</b>如果任务入口为手机端，则需额外增加<b class="orange">1元。</b><br /><span class="ml40">刷手买号如果和任务标签匹配佣金加1元。</span><br>
                                        </p>
                                    </div>
                                </th>
                            </tr>
                            <tr>
                                <td>
                                    <div class="rule fl">买号佣金规则</div>
                                    <div class=" fl rion">
                                        <table>
                                            <thead>
                                            <tr>
                                                <th><img src="/static/images/1446833157.png" /></th><th><img src="/static/images/1445571326.gif" /></th><th><img src="/static/images/1445571336.gif" /></th><th><img src="/static/images/1445571346.gif" /></th><th><img src="/static/images/1445571356.gif" /></th><th><img src="/static/images/1445571373.gif" /></th><th><img src="/static/images/1445571384.gif" /></th>		</tr>
                                            </thead>
                                            <tbody>
                                            <tr>
                                                <td>3.00元</td><td>4.50元</td><td>5.50元</td><td>6.00元</td><td>7.00元</td><td>7.50元</td><td>8.00元</td>		</tr>
                                            </tbody>
                                        </table>
                                    </div>
                                    <div class="rule fl">任务商品价格佣金规则</div><p class="summary mt10 fl">超过<b class="orange">200</b>元以上的任务商品价格每增加<b class="orange">200</b>元增加<b class="orange">0.5</b>元佣金</p><p class="summary mt10 sun fl"><b class="orange">温馨提示：</b>多链接任务每 增加一个链接需增加<b class="orange">0.5元</b></p>
                                </td>
                            </tr>
                            </thead>
                    </div>
    </div>
    </td>
    </tr>
    <tr>
        <td colspan="2" class="aui_footer">
            <div class="aui_buttons false">
                <input class="btn btn-search btn-orange" value="关闭" type="button">
            </div>
        </td>
    </tr>
    </tbody>
    </table>
</div>
</td>
<td class="aui_e"></td>
</tr>
<tr>
    <td class="aui_sw"></td>
    <td class="aui_s"></td>
    <td style="cursor: se-resize;"

        class="aui_se"></td>
</tr>
</tbody>
</table>
</div>
</div>
</form>

<script type="text/javascript" src="/static/js/tbnewtask.js"></script>
